﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using Warehouse.Silverlight.Modules.Main.Models;

namespace Warehouse.Silverlight.Modules.Main.Services
{
    public class OrganizationService_DesignTime : IOrganizationService
    {
        public Organization[] GetOrganizations()
        {
            return new Organization[]
            {
                new Organization("Org1"),
                new Organization("Org2"),
            };
        }

        public Department[] GetDepartments(Organization organization)
        {
            switch (organization.Name)
            {
                case "Org1":
                    return new Department[]
                    {
                        new Department("Dep11"),
                        new Department("Dep12"),
                    };
                case "Org2":
                    return new Department[]
                    {
                        new Department("Dep21"),
                        new Department("Dep22"),
                        new Department("Dep23")
                    };
            }
            return null;
        }

        public Employee[] GetEmployees(Department department)
        {
            switch (department.Name)
            {
                case "Dep11":
                    return new Employee[]
                    {
                        new Employee("Emp111"),
                        new Employee("Emp112"),
                        new Employee("Emp113"),
                    };

                case "Dep12":
                    return new Employee[]
                    {
                        new Employee("Emp121"),
                        new Employee("Emp122"),
                        new Employee("Emp123"),
                    };

                case "Dep21":
                    return new Employee[]
                    {
                        new Employee("Emp211"),
                        new Employee("Emp212"),
                        new Employee("Emp213"),
                    };
                case "Dep22":
                    return new Employee[]
                    {
                        new Employee("Emp221"),
                        new Employee("Emp222"),
                        new Employee("Emp223"),
                    };
                case "Dep23":
                    return new Employee[]
                    {
                        new Employee("Emp231"),
                        new Employee("Emp232"),
                        new Employee("Emp233"),
                    };
            }
            return null;
        }
    }
}
